package edu.面向对象基础.构造方法.案例;

public class TestStudent {
    public static void main(String[] args) {
        //1.无参构造方法，使用set赋值
        Student stu1=new Student();
        stu1.setAge(20);
        stu1.setName("张三");
        stu1.show();

        //2.有参构造方法，直接给属性赋值
        Student stu2=new Student("李四",20);
        stu2.show();
    }
}
